﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;

namespace pcsse
{
    public class db_test
    {
        public db_test()
        {
            
        }

        public string GetNameById(string id)
        {
            SqlCommand cmd = new SqlCommand();
            cmd.CommandText = "select NAME from T_TEST where ID=@ID";
            cmd.Parameters.Add("@ID",id);
            DataTable dt =db_base.getDBhandle().GetDataTableByCmd(cmd);
            if (dt.Rows.Count == 1)
                return dt.Rows[0][0].ToString();
            else
                return "找不到该id";
        }
        
    }
}
